home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 January / macformat-033.iso / mac / Shareware City / Developers / ABox.v1.8 / Header Files / ABUControls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-23  |  3.4 KB  |  123 lines  |  [TEXT/MMCC]

  1. /*    
  2.     Copyright © 1991-1995 by TopSoft Inc.  All rights reserved.
  3.  
  4.     You may distribute this file under the terms of the TopSoft
  5.     Artistic License, accompanying this package.
  6.     
  7.     This file was developed by George (ty) Tempel in connection with TopSoft, Inc..
  8.     See the Modification History for more details.
  9.  
  10. Product
  11.     About Box
  12.  
  13. FILE
  14.     ABUControls.h
  15.  
  16. NAME
  17.     ABUControls.h, part of the ABox project source code,
  18.     a utility class, mixed into other classes, responsible for 
  19.     handling the AboutBox Controls stuff.
  20.  
  21. DESCRIPTION
  22.     This file contains defines for the about box modules.
  23.     
  24. DEVELOPED BY
  25.     George (ty) Tempel                netromancr@aol.com
  26.     All code in this file, and its associated header file was
  27.     Created by George (ty) Tempel in connection with the TopSoft, Inc.
  28.     "FilterTop" application development, except where noted.
  29.  
  30. CARETAKER - George (ty) Tempel <netromancr@aol.com>
  31.      Please consult this person for any changes or suggestions to this file.
  32.  
  33. MODIFICATION HISTORY
  34.  
  35.     dd mmm yy    -    xxx    -    patchxx: description of patch
  36.     9 June 94    -    ty    -    Initial Version Created
  37.     20-july-94    -    ty    -    initial version released
  38.     23-may-95    -    ty    -    changes for compatibility with the CodeWarrior CW6
  39.                             release and the associated Universal Headers from Apple:
  40.                             most methods that returned references now have "Ref" at
  41.                             the end of their methods names to prevent possible collisions
  42.                             with datatypes and classes of the same name (older versions
  43.                             of the compiler didn't have a problem with this).
  44.  
  45. */
  46.  
  47. /*===========================================================================*/
  48.  
  49. /*========== Exclusion Macros ============*/
  50.  
  51. #pragma    once
  52.  
  53. #ifndef    _ABUControls_
  54. #define    _ABUControls_
  55.  
  56.  
  57. /*============ Header Files ==============*/
  58.  
  59. /*=========== External Linkage ===========*/
  60.  
  61. /*================ Macros ================*/
  62.  
  63. /*============== Constants ===============*/
  64.  
  65. //    kABacControlsControl, kABdeacControlsControl are used
  66. //    in determining and/or setting the control states of
  67. //    dialog items via the Control Manager.
  68. #define        kABactivateControl                    0
  69. #define        kABdeactivateControl                255
  70.  
  71.  
  72. //    kABscrollBarWidth and kABscrollBarMinLength are used
  73. //    in the about box code to describe, respectively,
  74. //    the width and minimum length of the scroll bar used by the
  75. //    DoText() function to draw/display text records in the slide area.
  76. #define        kABscrollBarWidth                    (16)
  77. #define        kABscrollBarMinLength                (55)
  78.  
  79. /*================ Enums =================*/
  80.  
  81. /*=============== Structs ================*/
  82.  
  83. /*=============== Typedefs ===============*/
  84.  
  85. typedef struct _ABControlList
  86.     {
  87.         ControlHandle    handle;
  88.         short            state;
  89.     } ABControlList, *ABControlListPtr, **ABControlListHandle;
  90.     
  91.  
  92. /*=========== Class Definitions ==========*/
  93.  
  94. class    ABUControls
  95. {
  96.     public:
  97.                         ABUControls(void);
  98.         virtual            ~ABUControls(void);
  99.     
  100.         static    ControlHandle    GetControlHandle (GrafPtr thebox, short theGetItem);
  101.         static    Boolean            FlashControl (ControlHandle ctrl);
  102.         static    Boolean            IsControlActive (ControlHandle ctrl);
  103.         static    OSErr            CheckControl (ControlHandle ctrl, Boolean setCondition);
  104.         static    OSErr            CheckAllControls (WindowPtr window, Boolean setCondition);
  105.         
  106.                 short            CountControls (WindowPtr window);
  107.                 OSErr            SaveControlStates(WindowPtr window);
  108.                 OSErr            RestoreControlStates(WindowPtr window);
  109.                 
  110.     protected:
  111.         
  112.     private:
  113.             ABControlListPtr    cList;
  114.             short                cNumber;
  115. };
  116.  
  117.  
  118. /*========== Function Prototypes =========*/
  119.  
  120.  
  121. #endif    // _ABUControls_
  122.  
  123.